#include "my_tree.hpp"
#include <vector>
#include <string>
// using namespace std;
// int main()
// {
//     My_Tree my_tree;
//     vector<Data> vdata{{'A',1},{'B',2},{'C',4},{'#',-1},{'D',7},{'F',5},{'E',3},{'#',-1},{'G',6},{'H',8},{'#',-1},{'#',-1},{'#',-1}};
//     int i=0;
//     my_tree.BinaryTreeCreate(vdata,i);
//     my_tree.BianryTreePreOrder();
//     return 0;
// }

#include "my_tree.hpp"
#include <vector>
#include <string>
using namespace std;

// int main()
// {
//     My_Tree my_tree;
//     vector<Data> vdata{{'A', 1}, {'B', 2}, {'C', 4}, {'#', 0}, {'D', 7}, {'F', 5}, {'E', 3}, {'#', 0}, {'G', 6}, {'H', 8}, {'#', 0}, {'#', 0}, {'#', 0}};
//     int i = 0;
//     my_tree.BinaryTreeCreate(vdata, i);
//     my_tree.BianryTreePreOrder();
//     return 0;
// }

int main()
{
    My_Tree _tree;
    _tree.root = new TreeNode({'A', 1});
    _tree.root->_left = new TreeNode({'B', 2});
    _tree.root->_right = new TreeNode({'E', 3});
    _tree.root->_right->_right = new TreeNode({'G', 6});
    _tree.root->_right->_right->_left = new TreeNode({'H', 8});

    _tree.root->_left->_right = new TreeNode({'F', 5});
    _tree.root->_left->_left = new TreeNode({'C', 4});
    _tree.root->_left->_left->_right = new TreeNode({'D', 7});

    _tree.BianryTreePreOrder();
    _tree.BianryTreeInOrder();
    _tree.BianryTreePostOrder();
    _tree.LevelOrderTraversal();
    cout << "--------------------" << endl;
    ;
    _tree.BianryTreeNonPre();
    _tree.BianryTreeNonInOrder();
    _tree.BainaryTreeNonPost();

    _tree.BianrytreeLevelOrder();

    cout << "----------------------" << endl;
    _tree.DfsPrevOder(7);
    _tree.DfsPostOrder(7);
    _tree.BinarytreeLevelOrderSearch(7);
    return 0;
}